home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir34
/
cmb113.zip
/
README
< prev
next >
Wrap
Text File
|
1993-05-03
|
23KB
|
558 lines
COMBI-Disk -
RAM disk & disk cache
Preface.
--------
- Why don't You use disk cache?
- I'd like, but memory constrains prevent me from using it:
I need more memory for RAM disk.
-----
- Why don't You use RAM disk?
- I'd like, but memory constrains prevent me from using it:
I need more memory for disk cache.
-----
- Why don't You use RAM disk or disk cache?
- I'd like, but some of my applications require free extended
memory.
If one of these answers is Yours then COMBI-Disk is for You!
You may hit THREE targets with a single shot - installing COMBI-Disk
You get a RAM disk and a Disk-Cache and free XMS memory at the same
time in the SAME area of extended memory!
When You install COMBI-Disk You specify amount of extended memory for
it and You get a RAM disk of the specified size and a Disk-Cache of the
same size. You may also specify amount of memory which should be
released if some program requires it. Then when You work with Your PC,
You enjoy COMBI's disk cache which is not worse than others (I hope it
is better). Suppose now that You start a program which needs a disk
buffer for temporary storage and tell it to use RAM disk. Then the
program may use the whole amount of the RAM disk's space (though
contracting the size of cache). When it terminates and deletes
temporary files You get back your cache buffer! If a program requests
XMS memory COMBI-disk may loan some of its memory to the program (if it
has the requested amount free of RAM disk data). When the program
releases the memory COMBI-disk reallocates it back.
I've been reported of 25% increase in compilation speed with COMBI
compared to that for other cache programs. Sure, the starting conditions
were different: with COMBI the source files were put on the RAM disk
and the compiler (BCX.EXE) used XMS memory released by COMBI. In fact,
one could, probably, achieve the same performance installing a RAM disk
and setting cache size so that there is enough free XMS not used by either
RAM disk or disk cache. But how would one calculate the optimal size of
RAM disk and free XMS? And that is not very convenient to reconfigure
(and reboot) system depending on what task are You going to deal with.
Applications.
------------
Some programs (e.g. compilers, word-processors etc.) need a buffer for
temporary storage, and if the storage is RAM disk then their performance
may be increased few times compared with the case of usage of hard disk
instead. That's why You may sometimes need a RAM disk. But if You use
standard RAM disk (Microsoft (C) RAMDRIVE.SYS or IBM (C) VDISK.SYS or any
other) it often comes out that it stays empty most of the time though
consuming Your extended (expanded) memory. That's why You may wish to
give up using RAM disk or make it less in order to have more memory
for disk cache which is always useful.
Moreover, some of programs can take advantage of XMS memory if it is
available. That's why You may wish to give up using disk cache (though
some of caches support memory reallocation without reinstallation).
Don't get disappointed!
COMBI-Disk
is a nice solution of this problem! It uses a little more memory for
RAM disk than is needed to keep all files written into it while all the
remaining memory is used for cache. You need not bother to make this
memory larger - just WRITE Your file(s) into RAM disk, all the rest it
does itself! You need not bother as well to contract RAM disk's size
and increase cache size - just DELETE files from RAM disk and all the
released memory will be used for cache! You need not bother to
reconfigure Your system when You need some free XMS memory - COMBI-disk
takes care of that itself (however, if You forgot to specify amount of
memory COMBI-disk would release, You have to run COMBI control program
to tell COMBI-disk that You need certain amount of free XMS memory).
System requirements.
-------------------
1. 80x86 based machine with extended memory.
2. DOS 3.30+.
3. Extended memory manager which supports XMS 2.0 specifications
which supports "reallocate XMS" function (Microsoft (C) HIMEM.SYS
ver 2.77+ or Quarterdeck (C) QEMM.SYS will do, as well as most
others).
General features.
----------------
- COMBI-disk may use up to 16 Mbytes of extended (XMS) memory.
- Up to 8 physical hard disks are supported.
- Starting from version 1.00 background write caching is
supported.
- Automatic reallocation of XMS memory.
- Variable size of cache block (memory allocation unit) -
from 1 to 8 disk sectors (512 bytes each).
- IOCtl interface to control program.
- HMA may be used for COMBI-disk data tables (even when MS-DOS
5.0 is loaded into HMA and under DR-DOS 6.0 as well).
Installation.
------------
WARNING! It is recommended to make backup of hard disk before
installation of COMBI-disk (as well as any other disk cache program).
COMBI-Disk installation process is quite straightforward, although it
requires some tweaking with the contents of your CONFIG.SYS file. Copy
COMBI.SYS into Your hard-disk and insert the following line into Your
CONFIG.SYS file
DEVICE=[drive:][path]COMBI.SYS [<parameters>]
The proper place in CONFIG.SYS would be after all memory managers,
after disk managers and if possible before disk write-protection
programs (otherwise You should not turn on write caching).
The <parameters> are all optional and include:
[<buff_size> [<rls_size>]] [/V [<RAMd_parms>]] [/C [<cache_parms]] [/H] [/Q]
<buff_size> - the amount of XMS memory (Kbytes) You want to use for
COMBI-Disk. Minimum is 128K, maximum is about 14000K.
If it is omitted then all available memory is default.
There is no harm if You specify more memory than really is
available - then COMBI-disk uses all available memory.
<rls_size> - maximum number of XMS memory (Kbytes) COMBI-disk should
release when it is requested. Default is all available.
If You want to ensure that there always is some memory
available for RAM disk You may specify this size to be
less than COMBI allocates for its buffers. Note, if You
want to specify this number You should also specify
<buff_size>.
/V - means that RAM disk parameters follow.
<RAMd_parms> - RAM disk parameters may be the following:
F:<disk_size>- specifies formatted size of RAM disk. By default COMBI
creates RAM disk of the size (<buff_size> - <min_cache>)
Kbytes. But You may specify a less size.
R:<root_num> - number of entries in root directory of RAM disk. Default
is 64. If You encounter DOS error "can't create file..."
when number of file in root directory is 63 (plus one
for volume label) then try specifying, say, R:128.
S:<sect_size>- sector size for RAM disk - 256 or 512 bytes, default is
512 bytes. Using 256 bytes sectors may sometimes save
some space on RAM disk but this is effective only if
RAM disk size is less than 1 Mbyte.
N - tells RAM disk not to return 'sector not found' error
(see also below). This setting may be always changed by
control program.
/C - means that cache parameters follow.
<cache_parms>- cache parameters may be the following:
M:<min_cache>- specifies minimum cache size (Kbytes). This reduces size
of RAM disk but guarantees that specified amount of
memory will be always allocated to cache. Default is 0.
U:<block_sec>- number of sectors per cache block (from 1 to 8). Using
smaller blocks may result in more effective usage of
memory (if You have not much of it) but leads to slower
operation for large read/write transfers. Default is 8.
O - tells COMBI-disk to turn OFF disk cache after
installation. Cache may be turned ON at any time by
control program. This may be useful for testing period
if You have some problems.
B - enable background disk writes. By default background
writes are set off on installation. May be changed at
any time by control program.
I - forces COMBI's disk cache to start background writing
immediately. By default background writing starts within
18 timer ticks (approx. 1 sec.) after last access to hard
disk. This is in effect only when background writing is
enabled. I admit that sometimes it may be more safe to
start writing immediately rather than wait a second, but
as a rule that slows down cache performance, especially
for large transfers.
/H - tells COMBI-disk to use HMA for data tables.
/Q - tells COMBI-disk not to display installation parameters.
In short, recommended installation parameters for best performance are:
DEVICE=<drive>:<path>COMBI.SYS /C B /H
In this case COMBI allocates all available XMS memory but will release
almost all when it is requested, RAM disk is created of maximum size
and write caching is enabled. (You may use explicitly set COMBI's buffer
size and other numbers if You or don't want to spend all XMS for COMBI
or want to ensure that there is always some memory available for RAM disk.)
Note: Minus ('-') may be used everywhere in command line instead of
slash ('/'), and equal sign ('=') instead of colon (':'). Case
of the letters is insignificant. Spaces are required only after
COMBI.SYS name and between two adjacent numbers.
Installation messages.
---------------------
COMBI-Disk: RAM disk & disk cache
Copyright 1991-1993 by Vadim V. Vlasov, Moscow, Russia,
Version 1.13
- This banner always appears and tells You that
COMBI-disk is being installed.
ERROR: Incorrect DOS version!
- DOS version must be above or equal to 3.30 and below or
equal to 6.00.
ERROR: Invalid parameter!
- An invalid parameter appears in command line or some
parameter is specified in improper place.
ERROR: Extended Memory Manager not present!
- COMBI-Disk needs XMM driver. Check that Your XMM driver
is installed before COMBI-Disk.
ERROR: No extended memory available!
- All Your extended memory is used by some other programs
or less than 128K is available.
ERROR: Can't allocate extended memory!
- An error encountered when COMBI-Disk tried to allocate
extended memory.
ERROR: Not enough memory!
- Not enough memory for COMBI-disk's code and data. This
is almost impossible.
ERROR: No hard drives on system(?!)
- COMBI-disk can't determine presence of hard disk(s) and
its (their) parameter(s).
WARNING: Inconsistent parameters.
- Some of numeric parameters conflict with each other. As
a rule this is not fatal - some of the numbers will be
adjusted.
WARNING: Can't hook XMS driver entry chain.
- COMBI-disk won't intercept XMS (re)allocation calls and
hence automatic reallocation of COMBI's memory is
disabled. However, You may change amount of used XMS
memory by control program.
WARNING: Not enough HMA for data tables or HMA not available.
- COMBI-disk will use more low memory for its data tables.
(For 3 Mbytes buffer it is about 12K)
If "ERROR:..." message is displayed COMBI-disk aborts installation.
If the installation is successful a box is displayed (if it is not
suppressed by /Q switch) which summarizes installation options and
announces how much memory is used by COMBI-disk.
Note. Some of numeric parameters specified in command line may be
adjusted by COMBI-disk.
Testing.
-------
A simple test program CMBTEST.COM is supplied with the package. It
writes randomly to few files, deletes some of them etc. Its objective
is to convince You that memory allocation strategy used by COMBI-disk
is reliable. It may also be used to test write caching reliability.
Usage:
CMBTEST <dirname> [<options>]
where <dirname> is name of directory (or drive) where CMBTEST will
write the files - it may be a directory on a hard drive or COMBI's RAM
disk. <options> may be used if You want to run multiple test series.
(For more details see the source code CMBTEST.C) I suggest You to
run
CMBTEST <COMBI's_RAM_drive_letter>:
and then
CMBTEST <some_temporary_directory_on_hard_disk>
and compare the resulted files:
COMP <path1>*.* <path2>
(<path1(2)> - pathnames of target directories). If all the "files
compare O'K" then there is no error and You may delete the files or
repeat the test with other options. Note: options must be the same for
both runs otherwise the files will be different.
You may also change the program if You have any new ideas how to
improve the test.
Control of operation.
--------------------
A control program COMBI.COM is supplied with the package. It allows
You to change cache or RAM disk options or change memory setting
without reconfiguring and rebooting. It also displays some statistic
information which may be helpful: current options, number of read/write
accesses to hard/RAM disk etc.
Usage:
COMBI [+/-<mem_change>] [<options>...]
where
<mem_change> - amount of memory (Kbytes) to add to or release from
COMBI-disk. If memory can't be reallocated by specified
amount COMBI will report that.
<options> - a sequence of any of letters 'i', 'o', 'b', 'z', 'f',
'r', 'n' which may be separated by spaces and/or
followed by '-' which reverses the meaning of the
option. Case of the letters is insignificant.
i - turn off delayed writing (write immediately) ('i-'
turns delayed writing on),
o - turn cache on ('o-' - turn off),
b - enable background writing ('b-' - disable),
z - 'freeze' cache - after freezing the sectors which are
already in cache remain there (are not purged) while
no new sectors are copied to cache. This may be useful
e.g. if You have small cache and want to keep there
only FAT and directories, then You might run "CHKDSK"
(which reads the whole FAT and all the directories)
and then "COMBI z". 'z-' returns cache to normal
operation.
f - fix memory settings - this disables automatic
reallocation of XMS memory to other programs.
n - tells RAM disk not to return 'sector not found' error.
r - resets all statistic counters (there is no 'r-'
option).
"COMBI ?" displays quick help on parameters usage.
Source code COMBI.C and header file IOCTL.H are supplied if You wish
to implement some control over COMBI-disk into Your applications.
Compatibility.
-------------
COMBI-disk is compatible with:
- MS-DOS versions 3.30 - 5.00 (if it were not it would be useless);
as regards MS-DOS 6.00 it has not been tested, however, I suppose
that there are no crucial changes to make COMBI incompatible;
- DR-DOS version 6.00 (version 5.00 was not tested);
- Borland's Turbo-debugger TD386 (TD386 uses XMS memory released by
COMBI-disk);
- MS-WINDOWS;
- DJGPP (GNU C++ compiler for DOS and GO32 DOS extender by
DJDelorie), however LD (DJGPP linker) often runs into "Sector not
found" error if some of object files are on RAM disk, usage of "N"
installation option or "COMBI n" solves the problem;
- Stacker and SuperStor disk compression drivers.
- many other programs.
COMBI-disk is incompatible with:
- Maybe some multitasking programs (please report me about any
incompatibilities).
- Windows can't start in enhanced mode under QEMM memory manager. There
are two reasons: first, WIN386.EXE uses other than XMS call way to
allocate memory. This may be solved by running 'COMBI -1000' before
starting Windows and 'COMBI +1000' after (put it into WIN.BAT file).
Second, QEMM's way of handling A20 line conflicts with that of Windows,
so, if COMBI uses HMA the system often hangs during Windows startup.
I know a way to fix this problem but it looks so ugly to me that I
prefer not to do that but rather recommend not to use HMA for COMBI
if You are going to run Windows under QEMM memory manager.
Possible errors.
---------------
Sector not found - You tried to read a sector which does not contain
any valid data (You haven't written into it yet or have already
deleted the file that occupied this sector). This never happens
with the majority of programs. However, for some programs this
occurs regularly. It is recommended to reply 'Ignore' to the
'Retry, Ignore, Fail?' DOS prompt. If You are sure that this
causes no errors You may specify option 'N' as one of
installation parameters (or run "COMBI n"). In this case the
'not found' sectors are also not read, but error status is not
returned by COMBI-disk.
Warning! Once a file is deleted from RAM disk, it might not be correctly
unerased by any means. It's data is lost immediately.
Data error writing drive <RAM_disk> - this may happen when some XMS
memory has been loaned to a program and that program also tries
to write some files to RAM disk which has not enough memory for
that. Suggested action - specify less amount of memory which
COMBI-disk should release for other programs or configure the
program to use other drive for temporary files.
The same problem may arise if a program which used XMS memory
terminated (or has been aborted) but not released memory. In
this case COMBI-disk can't reallocate XMS memory back to the
full size. It continues working but won't use the full buffer
size for cache or RAM disk data.
Other errors indicate that either COMBI-Disk internal data tables
are corrupt (e.g. overwritten by other program) or error in XMM driver
encountered.
Some hints.
----------
"TEMP" environment variable is used by MS-DOS as a directory for
temporary files, in particular when COMMAND.COM creates pipes
(e.g. "dir | sort | more" etc.).
"TMP" environment variable is used by many programs (e.g. Microsoft
compilers) as a directory for temporary files. So, setting TEMP and TMP
in AUTOEXEC.BAT to point to Your RAM disk may improve Your system
performance.
Many other programs also can take advantage of RAM disk - see their
manuals and configure them.
Using write caching is not very dangerous as it might seem. In fact,
when COMBI-disk is configured for background writing it often takes
less time to finish writing to hard disk than without write caching.
Moreover, while data is being written to disk You program continues
running and that saves You a lot of processor time. Enabling delayed
writing as a rule decreases number of hard disk accesses and hard disk
head motions. However, if You start a program that hooks INT 08 (timer)
and does not pass control to former INT 08 handlers (some games often
do that) it would be better if You disable delayed writes ("COMBI i")
before starting such a program and enable it later ("COMBI i-").
Freezing cache ("COMBI z") when it contains certain data may be useful
if COMBI-disk's buffer size is relatively small. E.g. Freezing cache
after "CHKDSK" results in faster search for a file or directory change,
freezing cache after run of some program (whose size is less than cache
size) results in faster loading of that program on future runs (while
other programs operate as without cache).
The name of the game.
--------------------
The name "COMBI" originates from "COMBInation" of such incompatible
(maybe even contradicting) at the first sight programs: RAM disk and
disk cache.
History information.
-------------------
Version 1.13 (03 May 1993): see the file WHATSNEW.113
Version 1.10 (01 Dec 1992):
Few bugs of version 1.00 were fixed. These include:
- "Not enough memory" error under DOS other than MS v.5.00;
- Very poor performance (worse than without cache) if VERIFY is set ON.
Now COMBI may use HMA under DR-DOS as well.
Performance of cache improved.
Write delay time increased from 5 to 18 clock ticks (1 sec).
Added Ctrl-Alt-Del handling to flush cache before reboot.
COMBI control program renamed from "CMBCTL" (which was hardly typeable
and hardly memorizable) to "COMBI", ANSI sequences are used to provide
color output.
Version 1.00 (08 Aug 1992):
A lot of new features added compared to prior versions: write
caching, reallocation of XMS memory, IOCtl interface to control
operation of COMBI-disk etc. Most of the code has been completely
rewritten. However, the main idea of dynamical memory reallocation
between RAM disk and disk cache remained the same.
Versions 0.10 (13 Aug 1991) - 0.31 (15 Feb 1992):
These were mainly trial versions to ensure reliability of the idea of
dynamical reallocation of memory for RAM disk.
The very first beta version of COMBI-Disk was version 0.01 (24 Jun 1991).
Future.
------
Here are some of my ideas about future development of COMBI:
- Caching of floppy disks;
- Special version for 80386 processor (probably, usage of 80386
instructions may increase performance);
- As regards usage of EMS instead of XMS, I'm not sure that it would be
an advantage. However, if there is enough interest in that I'll implement
EMS support;
- Further improvement of performance.
----------------
If You have any questions, comments or find out any problems with
COMBI-disk usage please contact:
Vadim V. Vlasov,
Inst. for Nuclear Research of Russian Acad. Sci.,
60th October Anniversary prospect, 7a,
117312, Moscow, Russia.
phone: 7-095-133-6533
Internet: vvlasov@inucres.msk.su